package com.schoolCommunity.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.schoolCommunity.entity.Information;
import com.schoolCommunity.entity.Member;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author YTH
 * @since 2020-09-06
 */
public interface MemberService extends IService<Member> {

    //注册，传入一个member对象
    public Information InsertMember(Member Member);


    //单独校验邮箱验证码
    public Information checkEmailSignIn(String email, String EmailSignIn);

    //登录，传入一个member对象
    public Information LoginMember(Member Member);

    //发送注册验证码
    public Information SendSignInEmail(String email, String kaptcha, HttpServletRequest request);

    //发送找回密码用验证码
    public Information SendGetPassEmail(String email, String kaptcha, HttpServletRequest request);

    //检测并修改密码
    public Information checkAndChangePass(Member Member, String EmailGetPass);

    //上传图片个人
    public Information UploadPicture(MultipartFile file, long memberId);

    //删除一张图片
    public Information DeletePicture(long memberId);


    //管理员功能，删除某一个用户
    public Information DeleteMember(long memberId) throws IOException;

    //管理员功能，修改某个用户信用等级
    public Information UpdateMemberCredit(long memberId, int creditNumber);

    //管理员功能，获取所有用户
    public Information GetAllMember();


}
